/*
 *	Copyright © 2013 Changsha Shishuo Network Technology Co., Ltd. All rights reserved.
 *	长沙市师说网络科技有限公司 版权所有
 *	http://www.shishuo.com
 */

package com.hlingsoft.cms.dao;


import com.hlingsoft.cms.entity.Focus;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 网站配置
 * 
 * @author Zhangjiale
 * 
 */

@Repository
public interface FocusDao {



	/**
	 * 添加图片
	 * 
	 * @return Integer
	 */
	public long addFocus(Focus focus);

	/**
	 * 查找关注记录
	 * @param myId
	 * @param toId
	 * @return
	 */
	public Focus getFocusByIds(@Param("myId") long myId,@Param("toId")long toId);

	/**
	 * 获取所有
	 * @param myId
	 * @param toId
	 * @return
	 */
	public Focus getFocusByIdsWithNone(@Param("myId") long myId,@Param("toId")long toId);

	/**
	 * 取消关注
	 * @param focus
	 * @return
	 */
	public int updateFocus(Focus focus);


	/**
	 * 获取粉丝列表
	 * @param toId
	 * @return
	 */
	public List<Focus> getFansList(@Param("toId") long toId);

	/**
	 * 获取粉丝数
	 * @param toId
	 * @return
	 */
	public int getFansCount(@Param("toId") long toId);

	/**
	 * 获取关注人列表
	 * @param myId
	 * @return
	 */
	public List<Focus> getAttentionsList(@Param("myId") long myId);


	/**
	 * 获取关注人
	 * @param myId
	 * @return
	 */
	public int getAttentionsCount(@Param("myId") long myId);


	/**
	 * 查找跟某人有关的关注信息
	 * @param appUserId
	 * @return
	 */
	public List<Focus> getFocusByAppUserId(@Param("appUserId") long appUserId);


	public List<Focus> getFocusByAppUserIdWithNone(@Param("appUserId") long appUserId);
}
